#ifndef __USB_PORT_H_
#define __USB_PORT_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include "system.h"


/* export func */

void usb_port_hw_init(void);

/* usb device msc */
#if (CONFIG_HAL_USB_DEVICE_CLASS_MSC_ENABLE)
void usbd_msc_init(void);
void usbd_msc_deinit(void);
#endif

/* usb device hid-custom */
#if (CONFIG_HAL_USB_DEVICE_CLASS_HID_CUSTOM_ENABLE)
void usbd_hid_custom_init(void);
void usbd_hid_custom_stop(void);
uint8_t usbd_hid_custom_send_data(uint8_t id, uint8_t *data, uint8_t len);
void usbd_hid_custom_set_rx02_handle(void (*func)(uint8_t *data, const uint8_t len));
void usbd_hid_custom_set_rx04_handle(void (*func)(uint8_t *data, const uint8_t len));
#endif

/* usb device cdc vcp(virtual COM port) */
void usbd_cdc_vcp_init(void);
void usbd_cdc_vcp_stop(void);
void usbd_cdc_vcp_set_rx_handle(void (*func)(uint8_t *data, const uint32_t len));
uint8_t usbd_cdc_vcp_send_data(uint8_t *data, uint32_t len);



#ifdef __cplusplus
}
#endif

#endif // __USB_PORT_H_
